""" DigitalICS: mobile data collection tool to complete surveys with integrated multimedia

    Copyright (C) 2009. Yael Schwartzman  

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
    
    Contact information: Yael Schwartzman -  yaelsf@gmail.com
    """


class Lang: 
    """ Defines languages """  
    
    def __init__(self,lang):
        self.lang = lang
        self.init_variables()
    
    def init_variables(self):
        
        if self.lang == 'en':
            self.YES = 'YES'
            self.NO = 'NO' 
            
            self.RECORD_AUDIO = "Record Audio"
            self.A_RECORD_AUDIO = "record_audio"
            self.AUDIO_NOT_RECORDED = "audio not recorded"
            self.AUDIO_RECORDED = "audio recorded"
            self.RECORDING = "Recording"
            self.STOP = "Stop"
            self.END_OF_RECORDING = 'End of Recording'
            
            self.TAKE_PICTURE =  'Take Picture'
            self.A_TAKE_PICTURE =  'take_picture'
            self.PICTURE_CANCELLED = "Picture Canceled"
            self.PICTURE_SAVED = "Photo Saved. Thank You!!"
            self.A_PICTURE_SAVED = "photo_saved"
            self.IMAGE_LOADING = 'Image Loading...'
            self.PICTURE_TAKEN = 'picture taken'
            self.PICTURE_NOT_TAKEN = 'picture not taken'
            
            self.WELCOME = "Welcome"
            self.NEW = "New"
            self.SAVE = "Save"
            self.OPEN = "Open"
            self.COMMENTS = "Comments"
            self.EXIT = "Exit"
            self.DELETE = "Delete"
            
            self.INSPECTOR = "Inspector"
            self.A_INSPECTOR = "inspector"
            self.PASSWORD = "Password"
            self.CONFIRM_ERASE = "Are you sure you want to erase all the data?"
            self.DATA_ERASED = "Data Erased"
            self.INCORRECT_PASSWORD = "Incorrect Password"
            self.CODES_FIRST = "Please enter Community and Producer code"
            
            self.ORGANIZATION = "Organization"
            self.PRODUCER = "Producer"
            self.MUNICIPIO = "Municipality"
            self.LOCALIDAD = "Locality" 
            self.EXISTING_ID = "A %s with that ID already exists. Try again?"
            self.A_EXISTING_ID = "intentar_en"
            
            self.LOADING_SUCCESSFUL = "Loading successful"
            self.A_LOADING_SUCCESSFUL = "loading_successful_en"
            self.LOADING_UNSUCCESSFUL = "Loading unsuccessful. Try Again."
            self.A_LOADING_UNSUCCESSFUL = "loading_unsuccessful_en"
            
            self.SAVING_SUCCESSFUL = "Saving successful"
            self.A_SAVING_SUCCESSFUL = "saving_successful_en"
            self.SAVING_UNSUCCESSFUL = "Saving unsuccessful. Try Again."
            self.A_SAVING_UNSUCCESSFUL = "saving_unsuccessful_en"
            
            self.SAVE_QUERY = "Would you like to save the current form?"
            self.A_SAVE_QUERY = "save"
            self.EXIT_QUERY = 'Would you like to exit this application?'
            self.A_EXIT_QUERY = 'exit'
            self.GO_BACK_QUERY = "Do you wish to go back to the main form?"
            self.A_GO_BACK_QUERY = "go_back_en" 
            self.SAVE_GO_BACK_QUERY= "Do you wish to save and go back to the main form?"
            self.A_SAVE_GO_BACK_QUERY = "save_go_back" 
            
            self.COMPLETED = "completed"
            self.A_DO_YOU_WISH_TO_COMPLETE = 'complete'
            self.DO_YOU_WISH_TO_COMPLETE = "Do you wish to complete"
            self.MASTER_FORM = "Master Form"
            
        if self.lang == 'sp':
            self.YES = 'SI'
            self.NO = 'NO'
            
            self.RECORD_AUDIO = "Grabar Audio"
            self.A_RECORD_AUDIO = "grabar_audio"
            self.AUDIO_NOT_RECORDED = "audio no grabado"
            self.AUDIO_RECORDED = "audio grabado"
            self.RECORDING = "Grabando"
            self.STOP = "Parar"
            self.END_OF_RECORDING = 'Fin de grabacion'
            
            self.TAKE_PICTURE =  'Sacar Fotografia'
            self.A_TAKE_PICTURE =  'sacar_foto' 
            self.PICTURE_CANCELLED = "Foto Cancelada"
            self.PICTURE_SAVED = "Foto Guardada. Gracias!"
            self.A_PICTURE_SAVED = "foto_guardada" #missing
            self.IMAGE_LOADING = 'Cargando Imagen...'
            self.PICTURE_TAKEN = 'foto tomada'
            self.PICTURE_NOT_TAKEN = 'foto no tomada'
            
            self.WELCOME = "Bienvenido"
            self.NEW = "Nuevo"
            self.SAVE = "Guardar"
            self.OPEN = "Abrir"
            self.COMMENTS = "Comentarios"
            self.EXIT = "Salir"
            self.DELETE = "Borrar"
            
            self.INSPECTOR = "Inspector"
            self.A_INSPECTOR = "inspector"
            self.PASSWORD = "Clave"
            self.CONFIRM_ERASE = "Esta seguro que quiere borrar todos los datos capturados?"
            self.DATA_ERASED = "Datos Borrados"
            self.INCORRECT_PASSWORD = "Clave Incorrecta"
            self.CODES_FIRST = "Por favor ingrese la clave de comunidad y productor primero"
            
            self.ORGANIZATION = "Organizacion"
            self.PRODUCER = "Productor"
            self.MUNICIPIO = "Municipio"
            self.LOCALIDAD = "Localidad"
            self.EXISTING_ID ="Esa identificacion ya existe. Volver a intentar?"
            self.A_EXISTING_ID = "intentar"
            
            self.LOADING_SUCCESSFUL = "Carga de formulario exitosa"
            self.A_LOADING_SUCCESSFUL = "loading_successful_es"
            self.LOADING_UNSUCCESSFUL = "Carga de formulario no exitosa. Intentar de nuevo"
            self.A_LOADING_UNSUCCESSFUL = "loading_unsuccessful_es"
            
            self.SAVING_SUCCESSFUL = "Se guardo exitosamente"
            self.A_SAVING_SUCCESSFUL = "saving_successful_es"
            self.SAVING_UNSUCCESSFUL = "No se pudo guardar el formulario. Intentar de nuevo."
            self.A_SAVING_UNSUCCESSFUL = "saving_unsuccessful_es"
            
            self.SAVE_QUERY ="Quiere guardar este formulario? "
            self.A_SAVE_QUERY = "guardar"
            self.EXIT_QUERY = 'Desea salir de esta aplicacion?' 
            self.A_EXIT_QUERY = 'exit'
            self.GO_BACK_QUERY = "Quiere regresar al formulario principal?" 
            self.A_GO_BACK_QUERY = "go_back" 
            self.SAVE_GO_BACK_QUERY = "Quiere guardar y regresar al formulario principal?"
            self.A_SAVE_GO_BACK_QUERY = "save_go_back_es" #missing
            
            self.COMPLETED = "llenada"
            self.A_DO_YOU_WISH_TO_COMPLETE = 'completar'
            self.DO_YOU_WISH_TO_COMPLETE = "Desea completar "
            self.MASTER_FORM = "Formulario Maestro"
            
class Properties:
    """  define own project's properties"""
    def __init__(self):
        self.MASTER_FORM ="en_master"
        self.LANGUAGE = "en"
        self.INSPECTOR_FORM = "enform1"